<%-- 管理员教师更新数据GUI页面--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<%@page import="org.edu.system.DBConnect"%>
<!DOCTYPE html>
<html>
<head>
<link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet">
<meta charset="UTF-8">
<title>DataUpdate</title>
<style type="text/css">
.box {
	width: 270px;
	height: 210px;
	text-align: right;
}
.fuck {
	text-align: center;
}
</style>
</head>
<body>
	<center>
	<br><br><br>
	<%
		String id = request.getParameter("id");
		//out.println(id);
		String sql_select = "SELECT * FROM teacher WHERE tc_id = '" + id + "'";
		try {
			Connection con = DBConnect.getCon();
			request.setCharacterEncoding("utf-8");
			System.out.println(sql_select);

			PreparedStatement pst = con.prepareStatement(sql_select);
			ResultSet rs = pst.executeQuery();
			System.out.println(pst);
			System.out.println(rs);
			if(rs.next()){
				//out.println(id);
	%>
	<div class="box">
		<form action="adm_teacher_doupdate.jsp?id=<%=rs.getString("tc_id")%>" method="post">
			<font color="red">*</font> 
			用户id：<input type="text" name="id" value="<%=rs.getString("tc_id")%>" class=“item” maxlength='8' readonly="readonly" ><br><br>
			用户名：<input type="text" name="username" value="<%=rs.getString("tc_name")%>" class=“item” maxlength='5'><br><br>
			用户密码：<input type="text" name="passwd" value="<%=rs.getString("tc_passwd")%>" class=“item” maxlength='32'><br><br>
			性别：
			<select name="gender" class="select">
					<option>男</option>
					<option>女</option>
					<option></option>
				</select> <br><br>
			所属院校：
			<select name="college" class="select">
					<option>计算机与信息学院</option>
					<option>智能制造学院</option>
					<option>商学院</option>
					<option>金融与贸易学院</option>
					<option>城建与环境学院</option>
					<option>法学院</option>
					<option>文学与传媒学院</option>
					<option>外国语学院</option>
					<option>创意设计学院</option>
					<option>艺术学院</option>
					<option>马克思主义学院</option>
					<option>创新创业学院</option>
					<option>体育教学部</option>
					<option></option>
				</select><br><br>
				电话号码：<input type="text" name="phone" value="<%=rs.getString("tc_phone")%>" class=“item” maxlength='15' ><br><br>
				身份证号码：<input type="text" name="identity" value="<%=rs.getString("tc_identity")%>" class=“item” maxlength='20'><br><br>
				居住地：<input type="text" name="location" value="<%=rs.getString("tc_location")%>" class=“item” maxlength='20'><br><br>
				<div class="fuck">
				<input type="submit" class="btn btn-success" id="fuck" value="保存修改">
				</div>
		</form>
	</div>
	<%
			}
		//out.println(id);
		} catch (Exception e) {
			out.println(e);
		}
	%>
	</center>
</body>
</html>